var config = {
    mysql: {
        host: 'localhost',
        port : '3306',
        database: 'disk',
        uname: 'root',
        passwd: 'root'
    },
    redis : {
        host: 'localhost',
        port: 6379,
        options: {
            connect_timeout: 60000,
            retry_strategy: function (options) {
                if (options.error.code === 'ECONNREFUSED') {
                    // End reconnecting on a specific error and flush all commands with a individual error
                    return new Error('The server refused the connection');
                }
                if (options.total_retry_time > 1000 * 60 * 60) {
                    // End reconnecting after a specific timeout and flush all commands with a individual error
                    return new Error('Retry time exhausted');
                }
                if (options.times_connected > 10) {
                    // End reconnecting with built in error
                    return undefined;
                }
                // reconnect after
                return Math.max(options.attempt * 100, 3000);
            }
        }
    },
    session : {
        ttl: 1800 // 单位：秒
    },
    file: {
        root: 'files',
        temp: 'temp',
        limitByte: 10000000000000
    },
    torrent: {
        limit: 3
    },
    media: {
        tcpServerHost: 'localhost',//'45.40.241.36',
        tcpServerPort: 2001,
        clientHost: 'localhost',
        clientHttp: 4030,
        rtmp: 1935,
        http: 2010,
        transcodingAvailable: true
    }
};

module.exports = config;
